package com.song.config;

import com.song.vo.Student;
import org.springframework.context.annotation.*;

/**
 * @ClassName : SpringConfig
 * @Author : 司猫子
 * @Date: 2021/2/28 19:28
 */
@Configuration
@ImportResource({"classpath:catconfig.xml","classpath:beans.xml"})
@PropertySource({"classpath:tiger.properties"})
@ComponentScan("com.song.vo")
public class SpringConfig {

    @Bean
    public Student createStudent(){
        Student student = new Student();
        student.setId(1002);
        student.setName("李四");
        return student;
    }
    @Bean(name = "lisiStudent")
    public Student getStudent(){
        Student student = new Student();
        student.setName("lisi");
        student.setAge(28);
        return student;
    }
}
